import { defineStore } from "pinia";
import { ref } from "vue";
export const useThemeTypeStore = defineStore(
  "themeType",
  () => {
    const theme = ref("light");
    const changeThemeType = (newTheme: any) => {
      theme.value = newTheme ? "dark" : "light";
    };
    return {
      theme,
      changeThemeType,
    };
  },
  {
    persist: true, // 开启持久化存储
  }
);
